child-process: watch child_process stdin pipe peer close event#62353
Open
Tseian wants to merge 1 commit intonodejs:mainfrom
Open
child-process: watch child_process stdin pipe peer close event#62353Tseian wants to merge 1 commit intonodejs:mainfrom
Tseian wants to merge 1 commit intonodejs:mainfrom
Conversation
071fa18 to
4cedb07
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62353 +/- ##
=======================================
Coverage 89.67% 89.67%
=======================================
Files 676 676
Lines 206693 206756 +63
Branches 39576 39594 +18
=======================================
+ Hits 185346 185418 +72
+ Misses 13482 13453 -29
- Partials 7865 7885 +20
🚀 New features to boost your workflow:
|
0ae2360 to
09463c0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
#25131
Description
Watch pipe peer close(EOF/HUP) event, only support for unix. Once the event is detected, a JS callback is triggered to execute, which in turn triggers a method to destroy the socket. Eventually child_process.stdin.on('close') will be triggered.
Before
child_process.stdin.on('close') will not be triggered if the readable end of the pipe has been closed.
After
child_process.stdin.on('close') will be triggered if the readable end of the pipe has been closed.
Changes
Test